#ifndef __LYNX_EXCEPTION_HPP_INCLUDED__
#define __LYNX_EXCEPTION_HPP_INCLUDED__

#include <Myth.hpp>

namespace Lynx
{

enum LYNX_EXCEPTION_CODE
{
    LEC_INTERNAL_ERROR,
    LEC_INVALID_STATE,
    LEC_PARAMETER_OUT_OF_RANGE,
    LEC_INVALID_PARAMETER,
};

////////////////////////////////////////////////////////////////////////////////
//! \brief The internal exception class.
/*!
 *
 */
class Exception : public std::exception
{
public:
    ////////////////////////////////////////////////////////////////////////////
    //! \brief Returns the exception code.
    /*!
     * \return The exception code.
     */
    virtual LYNX_EXCEPTION_CODE get_exception_code(void) const throw() = 0;

    ////////////////////////////////////////////////////////////////////////////
    //! \brief Returns the line of the exception.
    /*!
     * \return The line of the exception.
     */
    virtual uint32_t get_line(void) const throw() = 0;

    ////////////////////////////////////////////////////////////////////////////
    //! \brief Returns a description of the exception.
    /*!
     * \return A description of the exception.
     */
    virtual const std::string &get_description(void) const throw() = 0;

    ////////////////////////////////////////////////////////////////////////////
    //! \brief Returns a more complete description of the exception.
    /*!
     * \return A more complete description of the exception.
     */
    virtual const std::string &get_full_description(void) const throw() = 0;

    ////////////////////////////////////////////////////////////////////////////
    //! \brief Returns the file in which the exception occurred.
    /*!
     * \return The file of the exception.
     */
    virtual const std::string &get_file(void) const throw() = 0;

    ////////////////////////////////////////////////////////////////////////////
    //! \brief Returns the short function in which the exception occurred.
    /*!
     * An example of a short function is: random_function
     *
     * \return The shorted name of the function in which the exception occurred.
     */
    virtual const std::string &get_short_function(void) const throw() = 0;

    ////////////////////////////////////////////////////////////////////////////
    //! \brief Returns the long function in which the exception occurred.
    /*!
     * An example of a long function is: void cl::random_function(int,char*)
     *
     * \return The long name of the function in which the exception occurred.
     */
    virtual const std::string &get_long_function(void) const throw() = 0;

    ////////////////////////////////////////////////////////////////////////////
    //! \brief Overrides std::exception::what
    /*!
     * \return A description of the exception.
     */
    virtual const char *what(void) const throw() = 0;
};

} // namespace Lynx

#endif // __LYNX_EXCEPTION_HPP_INCLUDED__


